<table class="table">
  <thead>
    <th class="first"><%= sort_link @search, :presentation, "#{t 'helpers.label.role.presentation'}" %></th>
    <th><%= sort_link @search, :permissions, "#{t 'helpers.label.role.permissions'}" %></th>
    <th class="last"></th>
  </thead>
  <tfoot>
    <th><%= button_to_new "Vytvořit novou roli", new_admin_role_path if permitted_to? :create, :admin_roles %></th>
    <th colspan="2"><%= paginate roles %></th>
  </tfoot>
  <tbody>
    <% unless roles.blank? %>
      <%= render :partial => "role", :collection => roles %>
    <% else %>
    <tr>
      <th colspan="10">Nebyly nalezeny žádné role.</th>
    </tr>
    <% end %>
  </tbody>
</table>